package com.remontee.mecanique.mvc.controller;

/**
 * @author Michel
 */
public class ConfigController extends AbstractController {

	// Properties this controller expects to be stored in one or more registered
	// models

	/**
	 * The document's name
	 */
	public static final String CONFIG_NAME_PROPERTY = "Name";
	/**
	 * The document's Vitesse
	 */
	public static final String CONFIG_VITESSE_PROPERTY = "Vitesse";
	/**
	 * The document's Distance
	 */
	public static final String CONFIG_DISTANCE_PROPERTY = "Distance";
	/**
	 * The text element's string
	 */
	public static final String CONFIG_CAPACITE_PROPERTY = "Capacite";
	/**
	 * The text element's font
	 */
	public static final String CONFIG_LONGUEURREMONTEE_PROPERTY = "LongueurRemontee";
	/**
	 * The text element's X position
	 */
	public static final String CONFIG_LONGUEURDESCENTE_PROPERTY = "LongueurDescente";
	/**
	 * The text element's Y position
	 */
	public static final String CONFIG_VITESSEDESCENTE_PROPERTY = "VitesseDescente";
	/**
	 * The text element's opacity
	 */
	public static final String CONFIG_LOIENTREE_PROPERTY = "LoiEntree";
	/**
	 * The text element's rotation
	 */
	public static final String CONFIG_DEBITENTREE_PROPERTY = "DebitEntree";
	/**
	 * The text element's opacity
	 */
	public static final String CONFIG_LOISORTIE_PROPERTY = "LoiSortie";
	/**
	 * The text element's rotation
	 */
	public static final String CONFIG_DEBITSORTIE_PROPERTY = "DebitSortie";

	/**
	 * Change the config name in the model
	 * 
	 * @param newName
	 *            The new config name
	 */
	public void changeConfigName(String newName) {
		setModelProperty(CONFIG_NAME_PROPERTY, newName);
	}

	/**
	 * Change the Vitesse value in the model
	 * 
	 * @param newVitesse
	 *            The new Vitesse value
	 */
	public void changeConfigVitesse(int newVitesse) {
		setModelProperty(CONFIG_VITESSE_PROPERTY, newVitesse);
	}

	/**
	 * Change the Distance value in the model
	 * 
	 * @param newDistance
	 *            The new distance value
	 */
	public void changeConfigDistance(int newDistance) {
		System.out.println("Entered changeConfigDistance");
		setModelProperty(CONFIG_DISTANCE_PROPERTY, newDistance);
	}

	/**
	 * Change the Capacite value in the model
	 * 
	 * @param newCapacite
	 *            The new Capacite value
	 */
	public void changeConfigCapacite(int newCapacite) {
		setModelProperty(CONFIG_CAPACITE_PROPERTY, newCapacite);
	}

	/**
	 * Change the LongueurRemontee value in the model
	 * 
	 * @param newLongueurRemontee
	 *            The new LongueurRemontee value
	 */
	public void changeConfigLongueurRemontee(int newLongueurRemontee) {
		setModelProperty(CONFIG_LONGUEURREMONTEE_PROPERTY, newLongueurRemontee);
	}

	/**
	 * Change the LongueurDescente value in the model
	 * 
	 * @param newX
	 *            The new LongueurDescente value
	 */
	public void changeConfigLongueurDescente(int newLongueurDescente) {
		setModelProperty(CONFIG_LONGUEURDESCENTE_PROPERTY, newLongueurDescente);
	}

	/**
	 * Change the VitesseDescente value in the model
	 * 
	 * @param newVitesseDescente
	 *            The new VitesseDescente value
	 */
	public void changeConfigVitesseDescente(int newVitesseDescente) {
		setModelProperty(CONFIG_VITESSEDESCENTE_PROPERTY, newVitesseDescente);
	}

	/**
	 * Change the LoiEntree value in the model
	 * 
	 * @param newLoiEntree
	 *            The new LoiEntree value
	 */
	public void changeConfigLoiEntree(String newLoiEntree) {
		setModelProperty(CONFIG_LOIENTREE_PROPERTY, newLoiEntree);
	}

	/**
	 * Change the DebitEntree value in the model
	 * 
	 * @param newDebitEntree
	 *            The new DebitEntree value
	 */
	public void changeConfigDebitEntree(int newDebitEntree) {
		setModelProperty(CONFIG_DEBITENTREE_PROPERTY, newDebitEntree);
	}

	/**
	 * Change the LoiSortie value in the model
	 * 
	 * @param newLoiSortie
	 *            The new LoiSortie value
	 */
	public void changeConfigLoiSortie(String newLoiSortie) {
		setModelProperty(CONFIG_DEBITSORTIE_PROPERTY, newLoiSortie);
	}

	/**
	 * Change the DebitSortie value in the model
	 * 
	 * @param newDebitSortie
	 *            The new DebitSortie value
	 */
	public void changeConfigDebitSortie(int newDebitSortie) {
		setModelProperty(CONFIG_DEBITSORTIE_PROPERTY, newDebitSortie);
	}

}
